<?php
$language = $this->language();
$name = strtolower(system_controller_front::getInstance()->getRequest()->getActionName());
?>
<div class="body tabs">
	<ul class="list">
		<!-- province -->	
		<?php if(strpos($name, 'province') > -1) { ?>
		<li<?php if($name=='province') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/province');?>"><?php echo $language->load('Province List');?><?php if($name=='province') echo ' »'; ?></a>
		</li>
		<?php if($this->row && $this->row->getId()) { ?>
		<li<?php if($name=='editprovince') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/editProvince', array('id' => $this->row->getId()));?>"><?php echo $language->load('Edit Province');?>(<?php echo $this->row->getName();?>)<?php if($name=='editprovince') echo ' »'; ?></a>
		</li>
		<?php } ?>
		<li<?php if($name=='newprovince') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/newProvince');?>"><?php echo $language->load('New Province');?><?php if($name=='newprovince') echo ' »'; ?></a>
		</li>
		<?php } ?>
		<!-- city -->		
		<?php if(strpos($name, 'city') > -1) { ?>
		<li<?php if($name=='city') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/city', array('province_id' => $this->province->getId()));?>">[<?php echo $this->province->getName();?>] <?php echo $language->load('City List');?><?php if($name=='city') echo ' »'; ?></a>
		</li>
		<?php if($this->row && $this->row->getId()) { ?>
		<li<?php if($name=='editcity') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/editCity', array('id' => $this->row->getId()));?>"><?php echo $language->load('Edit City');?>(<?php echo $this->row->getName();?>)<?php if($name=='editcity') echo ' »'; ?></a>
		</li>
		<?php } ?>
		<li<?php if($name=='newcity') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/newCity', array('province_id' => $this->province->getId()));?>"><?php echo $language->load('New City');?><?php if($name=='newcity') echo ' »'; ?></a>
		</li>
		<?php } ?>
		<!-- zone -->		
		<?php if(strpos($name, 'zone') > -1) { ?>
		<li<?php if($name=='zone') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/zone', array('city_id' => $this->city->getId()));?>">[<?php echo $this->city->getName();?>] <?php echo $language->load('Zone List');?><?php if($name=='zone') echo ' »'; ?></a>
		</li>
		<?php if($this->row && $this->row->getId()) { ?>
		<li<?php if($name=='editzone') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/editZone', array('id' => $this->row->getId()));?>"><?php echo $language->load('Edit Zone');?>(<?php echo $this->row->getName();?>)<?php if($name=='editzone') echo ' »'; ?></a>
		</li>
		<?php } ?>
		<li<?php if($name=='newzone') echo ' class="current"'; ?>>
			<a href="<?php echo $this->url('system/region/newZone', array('city_id' => $this->city->getId()));?>"><?php echo $language->load('New Zone');?><?php if($name=='newzone') echo ' »'; ?></a>
		</li>
		<?php } ?>
	</ul>
	<div class="clearfix"></div>
</div>
